const app = getApp()

Page({
  data: {
    imgUrl: app.globalData.imgUrl,
    // AuthorizedItem:wx.getStorageSync('AuthorizedItem'),
    dataList: [{
      url: "/pages/publish/goods/goods",
      title: "商品",
      icon: "/icon/shangpin.png",
      auth: 'goods:create'
    }, {
      url: "/pages/publish/goodsgroup/index",
      title: "商品组",
      icon: "/icon/shangpin.png",
      auth: 'gdsGroup:add'
    }, {
      url: "/pages/publish/brand/index",
      title: "品牌",
      icon: "/icon/pinpai.png",
      auth: 'brand:add'
    }, {
      url: "/pages/publish/store/index",
      title: "体验店",
      icon: "/icon/tiyandian.png",
      auth: 'store:create'
    },
    {
      url: "/pages/publish/chain_store/index",
      title: "连锁总部",
      icon: "/icon/tiyandian.png",
      auth: 'chain:create'
    },{
      url: "/pages/publish/region/index",
      title: "区域经理",
      icon: "/icon/gonyingshan.png",
      auth: 'region:create'
    }, {
      url: "/pages/publish/agent/index",
      title: "代理商",
      icon: "/icon/gonyingshan.png",
      auth: 'agent:create'
    }, {
      url: "/pages/publish/staff/index",
      title: app.globalData.memeberText,
      icon: "/icon/yuangon.png",
      auth: 'emp:create'
    }, {
      url: "/pages/publish/supply/index",
      title: "供应商",
      icon: "/icon/gonyingshan.png",
      auth: 'sup:create'
    }, {
      url: "/pages/publish/cmsinfo/index",
      title: "活动资讯",
      icon: "/icon/huodonzixun.png",
      auth: 'info:create'
    }, {
      url: "/pages/publish/adpicture/index",
      title: "广告",
      icon: "/icon/guanggao.png",
      auth: 'ad:create'
    },
    // {
    //   url: "/pages/choose_colors/index",
    //   title: "调色",
    //   icon: "/icon/guanggao.png",
    //   auth: ''
    // },
    {
      url: "/pages/publish/device/index",
      title: "设备类型",
      icon: "/icon/equip_1.png",
      auth: 'deviceType:create'
    },{
      url: "/pages/publish/colour_atla/index",
      title: "电子色板",
      icon: "/icon/color_card.png",
      auth: 'dyeColor:create'
    },{
      url: "/pages/publish/bind_device/index",
      title: "绑定设备",
      icon: "/icon/device_icon.png",
      auth: 'device:create'
    },{
      url: "/pages/publish/device_intro/index",
      title: "设备说明",
      icon: "/icon/intro.png",
      auth: 'device:about:create'
    },{
      url: "/pages/publish/offline_order/index",
      title: "线下订单",
      icon: "/icon/off_order.png",
      auth: 'offline:order'
    },{
      url: "/pages/square/add",
      title: "笔记",
      icon: "/icon/square.png",
      auth: 'vlog:create'
    },{
      url: "/pages/square/category/index",
      title: "笔记分类",
      icon: "/icon/square.png",
      auth: 'vlog:category:create'
    }]
  },

  onShow: function() { 
     
  },

  //去发布
  toPublic: function(e) {
    var url = e.currentTarget.dataset.url;
    wx.navigateTo({
      url: url,
    })
  },

  closePublic: function() {
    wx.switchTab({
      url: '/pages/index/index',
    })
  }

})